package com.aat.dxfy.future;

public class FutureDate implements Data {
	protected RealData realData = null;
	protected boolean isReady = false;

	public synchronized void setRealData(RealData rd) {
		if (isReady) {
			return;
		}
		this.realData = rd;
		isReady = true;
		notifyAll();

	}

	public synchronized String getResult() {
		while (!isReady) {
			try {
				wait();
			} catch (InterruptedException e) {

			}
		}
		return realData.result;
	}
	
	
}
